﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Routing;

namespace BlueLotus7.Web
{
    public class PageRouteInfo
    {
        public virtual string Area
        {
            get;
            set;
        }

        public string Controller
        {
            get;
            set;
        }

        public string Action
        {
            get;
            set;
        }

        public PageRouteInfo()
        {
        }

        public bool EqualsUrl(PageRouteInfo info)
        {
            return info != null
                && !string.IsNullOrWhiteSpace(this.Area) && this.Area.Equals(info.Area, StringComparison.InvariantCultureIgnoreCase)
                && !string.IsNullOrWhiteSpace(this.Action) && this.Area.Equals(info.Action, StringComparison.InvariantCultureIgnoreCase)
                && !string.IsNullOrWhiteSpace(this.Controller) && this.Area.Equals(info.Controller, StringComparison.InvariantCultureIgnoreCase);
        }
    }
}